package com.hongan4d.system.service.impl;

import com.hongan4d.common.VO.CommonResult;
import com.hongan4d.system.dao.ProSystemUserInfoDao;
import com.hongan4d.system.entity.ProSystemUserInfo;
import com.hongan4d.system.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author tang
 * @version 1.0
 * @date 2021/1/5 15:25
 */
@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private ProSystemUserInfoDao proSystemUserInfoDao;

    @Override
    public CommonResult GetAll() {
        Map<String, Object> map = new HashMap<>();
        ProSystemUserInfo all = proSystemUserInfoDao.getAll();
        map.put("userId", all.getUserId());
        map.put("position", all.getPosition());
        return CommonResult.success(map);
    }
}
